﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.ServiceModel;
using Emerson.Storage.Service.Interface;
using Emerson.Storage.Entities;

namespace WorkstationDashboard
{
    public partial class Dashboard : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            
            //BasicHttpBinding myBinding = new BasicHttpBinding();
            //string applicationAddress = "http://localhost:8732/EmersonStorageService/Services/IApplicationService";
            //string workstationAddress = "http://localhost:8732/EmersonStorageService/Services/IWorkstationService";
            //EndpointAddress appEndPoint = new EndpointAddress(applicationAddress);
            //using (var appFactory = new ChannelFactory<IApplicationService>(myBinding, appEndPoint))
            //{
            //    IApplicationService appService = appFactory.CreateChannel();
            //    string appName = appService.GetApplicationName();
            //}


            //EndpointAddress wsEndpoint = new EndpointAddress(workstationAddress);
            //using (var wsFactory = new ChannelFactory<IWorkstationService>(myBinding, wsEndpoint))
            //{
            //    IWorkstationService wsService = wsFactory.CreateChannel();
            //    WorkstationRoot wr = wsService.WorkstationRoot;
            //    var groups = wr.Groups;
            //}
        }
    }
}
